import { baseUrl, doRequestPost, doRequestDel, doRequestPut, doRequestGet } from '@/utils/request'

export function listList(query) {
  return doRequestPost(baseUrl + 'cms/newsclass/list' + '?time=' + (+new Date()), query)
}

export function listAdd(query) {
  return doRequestPost(baseUrl + 'cms/newsclass/add' + '?time=' + (+new Date()), query)
}

export function listDelete(query) {
  return doRequestPost(baseUrl + 'cms/newsclass/delete/' + query.id + '?time=' + (+new Date()), {})
}

export function listEnable(query) {
  return doRequestPost(baseUrl + 'cms/newsclass/update/enable' + '?time=' + (+new Date()), query)
}

export function listPut(query) {
  return doRequestPost(baseUrl + 'cms/newsclass/update' + '?time=' + (+new Date()), query)
}

export function listGetEdit(query) {
  return doRequestGet(baseUrl + 'cms/newsclass/getEdit/' + query.id + '?time=' + (+new Date()), {})
}
